home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / system / mail / transpor / ifmail23.z / ifmail23 / ifmail / ifcico / ttyio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-18  |  1.4 KB  |  72 lines

  1. #ifndef TTYIO_H
  2. #define TTYIO_H
  3.  
  4. #define PUTCHAR(x) tty_putc(x)
  5. #define PUT(x,y) tty_put(x,y)
  6. #define PUTSTR(x) tty_put(x,strlen(x))
  7. #define GETCHAR(x) tty_getc(x)
  8. #define UNGETCHAR(x) tty_ungetc(x)
  9. #define GET(x,y,z) tty_get(x,y,z)
  10. #define STATUS tty_status
  11. #define TTYWAIT(x) ttywait(x)
  12.  
  13. #define STAT_SUCCESS 0
  14. #define STAT_ERROR   1
  15. #define STAT_TIMEOUT 2
  16. #define STAT_EOFILE  4
  17. #define STAT_HANGUP  8
  18. #define STAT_EMPTY   16
  19.  
  20. #define SUCCESS (STATUS == 0)
  21. #define ERROR (-STAT_ERROR)
  22. #define TIMEOUT (-STAT_TIMEOUT)
  23. #define HANGUP (-STAT_HANGUP)
  24. #define EMPTY (-STAT_EMPTY)
  25.  
  26. #define NUL 0x00
  27. #define SOH 0x01
  28. #define STX 0x02
  29. #define ETX 0x03
  30. #define EOT 0x04
  31. #define ENQ 0x05
  32. #define ACK 0x06
  33. #define BEL 0x07
  34. #define BS  0x08
  35. #define HT  0x09
  36. #define LF  0x0a
  37. #define VT  0x0b
  38. #define FF  0x0c
  39. #define CR  0x0d
  40. #define SO  0x0e
  41. #define SI  0x0f
  42. #define DLE 0x10
  43. #define DC1 0x11
  44. #define DC2 0x12
  45. #define DC3 0x13
  46. #define DC4 0x14
  47. #define NAK 0x15
  48. #define SYN 0x16
  49. #define ETB 0x17
  50. #define CAN 0x18
  51. #define EM  0x19
  52. #define SUB 0x1a
  53. #define ESC 0x1b
  54. #define FS  0x1c
  55. #define GS  0x1d
  56. #define RS  0x1e
  57. #define US  0x1f
  58. #define TSYNC 0xae
  59. #define YOOHOO 0xf1
  60.  
  61. extern int tty_status;
  62.  
  63. extern int tty_getc(int);
  64. extern int tty_ungetc(int);
  65. extern int tty_get(char*,int,int);
  66. extern int tty_putc(int);
  67. extern int tty_put(char*,int);
  68. extern int ttywait(int);
  69. extern void sendbrk(void);
  70.  
  71. #endif
  72.